package com.itany.shop.service;

import com.itany.shop.entity.User;
import com.itany.shop.exception.*;

/**
 * @author 黄衡熙
 * @version 1.0
 */
public interface UserService {
    /**
     * 用户注册
     * @param username 用户名不能重复
     * @param password 密码
     * @param phone 电话
     * @param address 地址
     */
    void register(String username,String password,String phone,String address) throws RequestParameterErrorException, UserExistException;
    /**
     * 用户登录
     * @param username
     * @param password
     */
    User login(String username, String password) throws RequestParameterErrorException, UserNotExistException;
    User login(String username, String password,String code,String image) throws RequestParameterErrorException, UserNotExistException, CodeErrorException;
    /**
     * 修改密码
     * @param password
     * @param user
     * @throws RequestParameterErrorException
     */
    void modifyPassword(String password, String oldPassword, User user) throws RequestParameterErrorException, PasswordErrorException, UserNotExistException;

}
